package com.lyubia.shop.rpc.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "shop",shards = 5,replicas = 1,createIndex = false)
public class GoodsVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private Integer id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String goodsName;

    @Field(type = FieldType.Double)
    private BigDecimal marketPrice;

    @Field(type = FieldType.Keyword)
    private String originalImg;

}
